<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>登录</title>
	<!-- Bootstrap -->
	<link rel="stylesheet" href="../../static/lib/bootstrap-3.4.1/css/bootstrap.min.css" th:href="@{/lib/bootstrap-3.4.1/css/bootstrap.min.css}">
	<style type="text/css" rel="stylesheet">
		.container{
			width: 80%;
			max-width: 600px;
			margin: 10% auto auto;
		}
		.panel-body{
			box-shadow: 10px 10px 10px 10px rgba(0, 0, 0, .3);
		}
	</style>
</head>

<body>
<div class="container">
	<div class="panel panel-default">
		<div class="panel-body">
			<div class="card-body">
				<h3 class="card-title" style="text-align: center;">登录</h3>
				<form method="post" th:action="@{/admin/login}">
					<div class="form-group">
						<label for="username">用户名</label>
						<input id="username" type="text" class="form-control" name="username" value="" required autofocus>
					</div>

					<div class="form-group">
						<label for="password">密码</label>
						<input id="password" type="password" class="form-control" name="password" required autofocus>
					</div>

					<div class="form-group">
						<button type="submit" class="btn btn-primary btn-block">
							登录
						</button>
					</div>
				</form>
			</div>
			<div class="alert alert-danger alert-dismissible" role="alert" th:unless="${#strings.isEmpty(msg)}">
				<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<strong>登录失败!</strong> <span th:text="${msg}"></span>
			</div>
		</div>
	</div>

</div>

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="../../static/lib/jquery-1.12.4/jquery.min.js" th:src="@{/lib/jquery-1.12.4/jquery.min.js}"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="../../static/lib/bootstrap-3.4.1/js/bootstrap.min.js" th:src="@{/lib/bootstrap-3.4.1/js/bootstrap.min.js}"></script>
</body>

</html>